﻿using System;
using System.Collections.Generic;

namespace Borg
{
    [Serializable]
    public class DiscoveryEventArgs : EventArgs
    {
        public MetaElementCollection<Contract> Contracts { get; private set; }
        public MetaElementCollection<Plugin> Plugins { get; private set; }

        public DiscoveryEventArgs(IEnumerable<Contract> contracts, IEnumerable<Plugin> plugins)
        {
            Contracts =
                contracts != null
                ? new MetaElementCollection<Contract>(contracts)
                : new MetaElementCollection<Contract>();
            
            Plugins =
                plugins != null
                ? new MetaElementCollection<Plugin>(plugins)
                : new MetaElementCollection<Plugin>();
        }
    }

    public delegate void DiscoveryEventHandler(DiscoveryEventArgs args);
}
